/*
 * IGMoveMaker.java
 * Created on 4 janv. 08
 *
 * Glacéo Internet Platform
 * http://sourceforge.net/projects/chm/
 *
 * Copyright (c) 2005-2008, Jan Janke (VirtualHockey Project)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.hockeo.vhbase.seasoncycle.movemaking;

import com.hockeo.vhbase.data.dao.IGDao;
import com.hockeo.vhbase.data.dao.club.GClub;
import com.hockeo.vhbase.data.dao.contest.GContestElement;
import com.hockeo.vhbase.data.dao.season.GMoveday;
import com.hockeo.vhbase.error.GException;

/**
 * Interface to be implemented by all move maker classes that may be used by computer
 * controlled user implementations to place goals. Move makers are used by parallel
 * running threads and are therefore not allowed to make any write operations.
 *
 * @version $Id$
 * @author jjanke
 */
public interface IGMoveMaker
{
  /**
   * Sets the DAO which is required for retrieving data from the database.
   *
   * @param dao the DAO for DB read operations.
   */
  public void setDao( IGDao dao );

  /**
   * Sets the move making environment.
   *
   * @param club the club for which to make the moves
   * @param element the contest element for which to make the moves
   * @param moveday the moveday for which the moves should be computed
   * @param fIsLastMoveday whether this is the last moveday of the season in the contest
   *          element
   */
  public void setEnvironment( GClub club, GContestElement element, GMoveday moveday,
      boolean fIsLastMoveday );

  /**
   * This method is responsible for executing the move-making process. It's called automatically
   * by the {@link GMMCallable#call()} method.
   */
  public GMMResult execute() throws GException;
}
